﻿using System;
using System.IO;
using System.Xml;
using CeskyRozhlasRT.Utils;

namespace CeskyRozhlasRTTests.RadioSchedule
{
    public class TestAssetManager:IAssetManager, IDisposable
    {
        private Stream _testXmlStream = null;
        public XmlReader GetXmlReader(string iUri)
        {
            _testXmlStream = new System.IO.FileStream(iUri, FileMode.Open, FileAccess.Read, System.IO.FileShare.ReadWrite);
            return XmlReader.Create(_testXmlStream);
        }

        public void Dispose()
        {
            if (_testXmlStream != null)
            {
                _testXmlStream.Dispose();
                _testXmlStream = null;
            }
        }
    }
}
